import { Router } from 'express';
import TCMKnowledgeController from '../controllers/tcmKnowledgeController';
import MedicinalCuisineController from '../controllers/medicinalCuisineController';
import WellnessKnowledgeController from '../controllers/wellnessKnowledgeController';
import ProductManagementController from '../controllers/productManagementController';
import OrderManagementController from '../controllers/orderManagementController';
import ForumManagementController from '../controllers/forumManagementController';
import UserInformationController from '../controllers/userInformationController';

const router = Router();

// TCM Knowledge Routes
router.route('/tcm-knowledge')
    .get(TCMKnowledgeController.getAll)
    .post(TCMKnowledgeController.create);

router.route('/tcm-knowledge/:id')
    .get(TCMKnowledgeController.getById)
    .put(TCMKnowledgeController.update)
    .delete(TCMKnowledgeController.delete);

// Medicinal Cuisine Routes
router.route('/medicinal-cuisine')
    .get(MedicinalCuisineController.getAll)
    .post(MedicinalCuisineController.create);

router.route('/medicinal-cuisine/:id')
    .get(MedicinalCuisineController.getById)
    .put(MedicinalCuisineController.update)
    .delete(MedicinalCuisineController.delete);

// Wellness Knowledge Routes
router.route('/wellness-knowledge')
    .get(WellnessKnowledgeController.getAll)
    .post(WellnessKnowledgeController.create);

router.route('/wellness-knowledge/:id')
    .get(WellnessKnowledgeController.getById)
    .put(WellnessKnowledgeController.update)
    .delete(WellnessKnowledgeController.delete);

// Product Management Routes
router.route('/products')
    .get(ProductManagementController.getAll)
    .post(ProductManagementController.create);

router.route('/products/:id')
    .get(ProductManagementController.getById)
    .put(ProductManagementController.update)
    .delete(ProductManagementController.delete);

// Order Management Routes
router.route('/orders')
    .get(OrderManagementController.getAll)
    .post(OrderManagementController.create);

router.route('/orders/:id')
    .get(OrderManagementController.getById)
    .put(OrderManagementController.update)
    .delete(OrderManagementController.delete);

// Forum Management Routes
router.route('/forum-posts')
    .get(ForumManagementController.getAll)
    .post(ForumManagementController.create);

router.route('/forum-posts/:id')
    .get(ForumManagementController.getById)
    .put(ForumManagementController.update)
    .delete(ForumManagementController.delete);

// User Information Management Routes
router.route('/users')
    .get(UserInformationController.getAll)
    .post(UserInformationController.create);

router.route('/users/:id')
    .get(UserInformationController.getById)
    .put(UserInformationController.update)
    .delete(UserInformationController.delete);

export default router;